home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 045a / tpapi1.zip / README.DOC < prev    next >
Text File  |  1991-12-04  |  3KB  |  91 lines

  1.                         Turbo Pascal API's for Novell Netware
  2.  
  3.                        Written by Tony Covelli (c) 1991
  4.  
  5. Welcome to Turbo Pascal API's for Novell Netware (TPAPI).  Please forgive for
  6. me for the quality of the documentation.  This will improve over time, but for
  7. those of you who can't wait you can buy Novell's 'C' Interface for DOS or their
  8. Systems Calls for DOS.
  9.  
  10. TPAPI is an object oriented library of Netware function calls.  It does not
  11. incorporate all of the available calls as of now, but I will continue to add
  12. existing and new calls.
  13.  
  14. The NetwareOBJ is the lowest object and contains all the low level routines
  15. that talk to the network shells.  All other objects are ancestors of this
  16. object.
  17.  
  18. The following information is provided for those who wish to add any of their
  19. own API's.
  20.  
  21. Example functions :
  22.  
  23. FUNCTION BinderyOBJ.ChangeBinderyObjectPassword (BinderyObjectName : ObjectNameType; BinderyObjectType : OT_BinderyType;
  24.                                                  OldPassword, NewPassword : PasswordType) : WORD;
  25.  
  26. BEGIN
  27.  
  28.   InitRequestBuffer;
  29.   InitReceiveBuffer;
  30.   BinderyObjectName := UpperCaseNW (BinderyObjectName);
  31.   OldPassword := UpperCaseNW (OldPassword);
  32.   NewPassword := UpperCaseNW (NewPassword);
  33.  
  34.   AddByte (64);
  35.   AddWordSwap (BinderyObjectType);
  36.   AddString (BinderyObjectName, 0);
  37.   AddString (OldPassword, 0);
  38.   AddString (NewPassword, 0);
  39.   AddTotal (Request);
  40.   SetTotal (Receive, 2);
  41.   AddTotal (Receive);
  42.   ChangeBinderyObjectPassword := ShellRequest (227, nwRequestBuffer, nwReceiveBuffer);
  43.  
  44. END; {BinderyOBJ.ChangeBinderyObjectPassword}
  45.  
  46. FUNCTION BinderyOBJ.ScanBinderyObject (SearchObjectName : ObjectNameType; SearchObjectType : OT_BinderyType;
  47.                                        VAR ObjectID : OT_BinderyID; VAR BinderyObjectName : ObjectNameType;
  48.                                        VAR BinderyObjectType : OT_BinderyType;
  49.                                        VAR ObjectHasProperties, ObjectFlags, ObjectSecurity : BYTE) : WORD;
  50.  
  51. BEGIN
  52.  
  53.   InitRequestBuffer;
  54.   InitReceiveBuffer;
  55.   SearchObjectName := UpperCaseNW (SearchObjectName);
  56.  
  57.   AddByte (55);
  58.   AddLongSwap (ObjectID);
  59.   AddWordSwap (SearchObjectType);
  60.   AddString (SearchObjectName, 0);
  61.   AddTotal (Request);
  62.   SetTotal (Receive, 59);
  63.   AddTotal (Receive);
  64.   ScanBinderyObject := ShellRequest (227, nwRequestBuffer, nwReceiveBuffer);
  65.   GetString (BinderyObjectName, 8, 48);
  66.   GetLongSwap (ObjectID, 2);
  67.   GetWordSwap (BinderyObjectType, 6);
  68.   GetByte (ObjectHasProperties, 58);
  69.   GetByte (ObjectFlags, 56);
  70.   GetByte (ObjectSecurity, 57);
  71.  
  72. END; {BinderyOBJ.ScanBinderyObject}
  73.  
  74. Each function must call InitRequestBuffer and InitReceiveBuffer first.  This
  75. clears out the internal buffers and resets the offset variables.
  76.  
  77. You must also call AddTotal twice, firstly with (Request) and once again after
  78. calling SetTotal (Receive, amount of data to return), but passing in Receive.
  79.  
  80. Please enjoy.  Any comments or suggestions are welcome.
  81.  
  82. Tony Covelli
  83. 23 Sefton House
  84. Grosvenor Road
  85. Aldershot
  86. Hants
  87. GU11 3DW
  88. England
  89.  
  90. CIS #100015, 3611
  91.